using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;
namespace Medianamik.Core.DAL.SubSonicDAL{
    public partial class SPs{
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_ApplyNodePermissionToChildren Procedure
        /// </summary>
        public static StoredProcedure ApplyNodePermissionToChildren(Guid? ParentNodeId, string GroupIds)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_ApplyNodePermissionToChildren", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@ParentNodeId", ParentNodeId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@GroupIds", GroupIds, DbType.AnsiString, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_ApplyTypePermissionToChildren Procedure
        /// </summary>
        public static StoredProcedure ApplyTypePermissionToChildren(Guid? ParentTypeId, string GroupIds)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_ApplyTypePermissionToChildren", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@ParentTypeId", ParentTypeId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@GroupIds", GroupIds, DbType.AnsiString, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_CleanUpNodePropertyValues Procedure
        /// </summary>
        public static StoredProcedure CleanUpNodePropertyValues(Guid? NodeId, string CultureName, int? MaxRevisions)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_CleanUpNodePropertyValues", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@NodeId", NodeId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@CultureName", CultureName, DbType.String, null, null);
        	
            sp.Command.AddParameter("@MaxRevisions", MaxRevisions, DbType.Int32, 0, 10);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetChildNodeIds Procedure
        /// </summary>
        public static StoredProcedure GetChildNodeIds(Guid? ParentId, string Inclusivity)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetChildNodeIds", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@ParentId", ParentId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Inclusivity", Inclusivity, DbType.AnsiString, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetChildNodeIdsFilteredByType Procedure
        /// </summary>
        public static StoredProcedure GetChildNodeIdsFilteredByType(Guid? ParentId, string Inclusivity, Guid? TypeId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetChildNodeIdsFilteredByType", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@ParentId", ParentId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Inclusivity", Inclusivity, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@TypeId", TypeId, DbType.Guid, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetChildNodes Procedure
        /// </summary>
        public static StoredProcedure GetChildNodes(Guid? ParentId, string Inclusivity)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetChildNodes", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@ParentId", ParentId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Inclusivity", Inclusivity, DbType.AnsiString, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetChildNodesFilteredByType Procedure
        /// </summary>
        public static StoredProcedure GetChildNodesFilteredByType(Guid? ParentId, string Inclusivity, Guid? TypeId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetChildNodesFilteredByType", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@ParentId", ParentId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Inclusivity", Inclusivity, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@TypeId", TypeId, DbType.Guid, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetLastNodeRevisions Procedure
        /// </summary>
        public static StoredProcedure GetLastPublishedNodeRevisions(Guid? NodeId, DateTime? RevisionMax)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetLastPublishedNodeRevisions", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@NodeId", NodeId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@RevisionMax", RevisionMax, DbType.DateTime, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetNodeIdsByType Procedure
        /// </summary>
        public static StoredProcedure GetNodeIdsByType(Guid? TypeId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetNodeIdsByType", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@TypeId", TypeId, DbType.Guid, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetNodePublications Procedure
        /// </summary>
        public static StoredProcedure GetNodePublications(Guid? NodeId, string CultureName)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetNodePublications", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@NodeId", NodeId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@CultureName", CultureName, DbType.String, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetNodesByType Procedure
        /// </summary>
        public static StoredProcedure GetNodesByType(Guid? TypeId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetNodesByType", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@TypeId", TypeId, DbType.Guid, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetNonTranslatedResources Procedure
        /// </summary>
        public static StoredProcedure GetNonTranslatedResources(string setX)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetNonTranslatedResources", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@set", setX, DbType.AnsiString, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetNonTranslatedResourceSets Procedure
        /// </summary>
        public static StoredProcedure GetNonTranslatedResourceSets()
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetNonTranslatedResourceSets", DataService.GetInstance("MedianamikProvider"), "");
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetParentNodeTypes Procedure
        /// </summary>
        public static StoredProcedure GetParentNodeTypes(Guid? TypeID, string Inclusivity)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetParentNodeTypes", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@TypeID", TypeID, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Inclusivity", Inclusivity, DbType.AnsiString, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetPendingApprobationByGroupId Procedure
        /// </summary>
        public static StoredProcedure GetPendingApprobationByGroupId(bool? publishing, bool? exactApprobationLevel, Guid? groupid, string culture, int? pagesize, int? pageindex)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetPendingApprobationByGroupId", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@publishing", publishing, DbType.Boolean, null, null);
        	
            sp.Command.AddParameter("@exactApprobationLevel", exactApprobationLevel, DbType.Boolean, null, null);
        	
            sp.Command.AddParameter("@groupid", groupid, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@culture", culture, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@pagesize", pagesize, DbType.Int32, 0, 10);
        	
            sp.Command.AddParameter("@pageindex", pageindex, DbType.Int32, 0, 10);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetPendingApprobationByGroupIdCount Procedure
        /// </summary>
        public static StoredProcedure GetPendingApprobationByGroupIdCount(bool? exactApprobationLevel, Guid? groupid, string culture, bool? publishing)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetPendingApprobationByGroupIdCount", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@exactApprobationLevel", exactApprobationLevel, DbType.Boolean, null, null);
        	
            sp.Command.AddParameter("@groupid", groupid, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@culture", culture, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@publishing", publishing, DbType.Boolean, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetPropertiesForChildsRecursive Procedure
        /// </summary>
        public static StoredProcedure GetPropertiesForChildsRecursive(Guid? parentTypeId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetPropertiesForChildsRecursive", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@parentTypeId", parentTypeId, DbType.Guid, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetPropertiesRecursive Procedure
        /// </summary>
        public static StoredProcedure GetPropertiesRecursive(Guid? typeId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetPropertiesRecursive", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@typeId", typeId, DbType.Guid, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetRootNodesByType Procedure
        /// </summary>
        public static StoredProcedure GetRootNodesByType(Guid? TypeId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetRootNodesByType", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@TypeId", TypeId, DbType.Guid, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetSomeChildNodeIds Procedure
        /// </summary>
        public static StoredProcedure GetSomeChildNodeIds(Guid? ParentId, string Inclusivity, int? Depth)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetSomeChildNodeIds", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@ParentId", ParentId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Inclusivity", Inclusivity, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@Depth", Depth, DbType.Int32, 0, 10);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetSomeChildNodeIdsFilteredByType Procedure
        /// </summary>
        public static StoredProcedure GetSomeChildNodeIdsFilteredByType(Guid? ParentId, string Inclusivity, Guid? TypeId, int? Depth)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetSomeChildNodeIdsFilteredByType", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@ParentId", ParentId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Inclusivity", Inclusivity, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@TypeId", TypeId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Depth", Depth, DbType.Int32, 0, 10);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetSomeChildNodes Procedure
        /// </summary>
        public static StoredProcedure GetSomeChildNodes(Guid? ParentId, string Inclusivity, int? Depth)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetSomeChildNodes", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@ParentId", ParentId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Inclusivity", Inclusivity, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@Depth", Depth, DbType.Int32, 0, 10);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetSomeChildNodesFilteredByType Procedure
        /// </summary>
        public static StoredProcedure GetSomeChildNodesFilteredByType(Guid? ParentId, string Inclusivity, Guid? TypeId, int? Depth)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetSomeChildNodesFilteredByType", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@ParentId", ParentId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Inclusivity", Inclusivity, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@TypeId", TypeId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@Depth", Depth, DbType.Int32, 0, 10);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetUsersByGroups Procedure
        /// </summary>
        public static StoredProcedure GetUsersByGroups(string Groups, int? PageSize, int? PageIndex, string keywords, bool? IsActive)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetUsersByGroups", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@Groups", Groups, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@PageSize", PageSize, DbType.Int32, 0, 10);
        	
            sp.Command.AddParameter("@PageIndex", PageIndex, DbType.Int32, 0, 10);
        	
            sp.Command.AddParameter("@keywords", keywords, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@IsActive", IsActive, DbType.Boolean, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_GetUsersByGroupsCount Procedure
        /// </summary>
        public static StoredProcedure GetUsersByGroupsCount(string Groups, string keywords, bool? IsActive)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_GetUsersByGroupsCount", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@Groups", Groups, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@keywords", keywords, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@IsActive", IsActive, DbType.Boolean, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_LoadChildNodes Procedure
        /// </summary>
        public static StoredProcedure LoadChildNodes(string TableName, Guid? NodeId, string CultureName, int? Generation, int? MaxDepth, int? IsActive, string InclusiveChar)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_LoadChildNodes", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@TableName", TableName, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@NodeId", NodeId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@CultureName", CultureName, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@Generation", Generation, DbType.Int32, 0, 10);
        	
            sp.Command.AddParameter("@MaxDepth", MaxDepth, DbType.Int32, 0, 10);
        	
            sp.Command.AddParameter("@IsActive", IsActive, DbType.Int32, 0, 10);
        	
            sp.Command.AddParameter("@InclusiveChar", InclusiveChar, DbType.AnsiString, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_LoadParentNodes Procedure
        /// </summary>
        public static StoredProcedure LoadParentNodes(string TableName, Guid? NodeId, string CultureName, int? Generation, int? MaxDepth, int? IsActive, string InclusiveChar)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_LoadParentNodes", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@TableName", TableName, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@NodeId", NodeId, DbType.Guid, null, null);
        	
            sp.Command.AddParameter("@CultureName", CultureName, DbType.AnsiString, null, null);
        	
            sp.Command.AddParameter("@Generation", Generation, DbType.Int32, 0, 10);
        	
            sp.Command.AddParameter("@MaxDepth", MaxDepth, DbType.Int32, 0, 10);
        	
            sp.Command.AddParameter("@IsActive", IsActive, DbType.Int32, 0, 10);
        	
            sp.Command.AddParameter("@InclusiveChar", InclusiveChar, DbType.AnsiString, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_TypeHasNodes Procedure
        /// </summary>
        public static StoredProcedure TypeHasNodes(Guid? typeId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_TypeHasNodes", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@typeId", typeId, DbType.Guid, null, null);
        	
            return sp;
        }
        
        /// <summary>
        /// Creates an object wrapper for the medianamik_TypeNodesCount Procedure
        /// </summary>
        public static StoredProcedure TypeNodesCount(Guid? typeId)
        {
            SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("medianamik_TypeNodesCount", DataService.GetInstance("MedianamikProvider"), "dbo");
        	
            sp.Command.AddParameter("@typeId", typeId, DbType.Guid, null, null);
        	
            return sp;
        }
        
    }
    
}
